package org.seedltd.upms.model.sys.common;

import org.seedltd.core.utils.tree.TreeNode;

import lombok.Getter;
import lombok.Setter;

/**
 *
 * 下拉选择树对象
 *
 * @author laizuan
 * @version 1.0
 * @since 2021/7/21 14:15
 */
@Getter
@Setter
public class SelectTreeVO extends TreeNode<SelectTreeVO> {

    /**
     * 父节点主键
     */
    private Long parentId;

    /**
     * 主键
     */
    private Long id;

    /**
     * 显示名称
     */
    private String name;

    @Override
    protected String getPid() {
        return this.parentId == null ? null : this.parentId.toString();
    }

    @Override
    protected Object getTid() {
        return this.id;
    }
}
